// 冒泡排序
export const sort = (arr)=>{
	for(let i=0;i<arr.length-1;i++){
		for(let j=0;j<arr.length-i-1;j++){
			if(arr[j]<arr[j+1]){// 相邻元素两两对比 降序
				let hand = arr[j];
				arr[j]=arr[j+1];
				arr[j+1]=hand;
			}
		}
	}
	return arr;
}
// 禁止页面弹窗显示滑动底部跟随滚动
export const stopBodyScroll = value=>{
	let body = document.body;
	if(value){
		body.style.position = 'fixed';
		body.style.width = '100%';
		body.style.height = '100vh'
	}else{
		body.style.position = 'static';
		body.style.height = 'auto'
	}
}